/*
 * @Author: WangShuai 1830773767@qq.com
 * @Date: 2025-09-26 10:25:48
 * @LastEditors: WangShuai 1830773767@qq.com
 * @LastEditTime: 2025-09-28 09:48:19
 * @FilePath: \app\vue.config.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
const path = require('path')

function resolve(dir) {
    return path.join(__dirname, dir)
}
const LOCAL_IP  = "192.168.10.17"
const {
    defineConfig
} = require('@vue/cli-service')
module.exports = defineConfig({
    transpileDependencies: true,
    configureWebpack: {
        resolve: {
            alias: {
                '@': resolve('src')
            }
        }
    },
    devServer: {
    host: '0.0.0.0', // 监听所有网络接口
    port: 8080, // 保持原端口，若被占用可修改
    allowedHosts: 'all', // 解决Invalid Host header错误
    // 新增：指定公网访问地址
    // public: `${LOCAL_IP}:8080`
  }
})